{% extends 'base.html' %}

{% block title %}天天生鲜-登录{% endblock title %}
{% block header %}

{% endblock header%}
{% block content %}
    <div class="login_top clearfix">
        <a href="index.html" class="login_logo"><img src="{{ STATIC_URL }}images/logo02.png"></a>
    </div>

    <div class="login_form_bg">
        <div class="login_form_wrap clearfix">
            <div class="login_banner fl"></div>
            <div class="slogan fl">日夜兼程 · 急速送达</div>
            <div class="login_form fr">
                <div class="login_title clearfix">
                    <h1>用户登陆</h1>
                    <a href="{% url 'user:register' %}">注册</a>
                </div>
                <div class="form_input">
                    <form action="{% url 'user:login' %}" method="post">
                        {% csrf_token %}
                        <input type="text" name="username" class="name_input" placeholder="请输入用户名"
                               value="{{ username }}">
                        <div class="user_error" style="display: block">
                            {% if login_form.errors.username %}
                                {{ login_form.errors.username.0 }}
                            {% endif %}
                        </div>
                        <input type="password" name="password" class="pass_input" placeholder="请输入密码"
                               value="{{ login_form.password.value }}">
                        <div class="pwd_error" style="display: block">
                            {% if login_form.errors.password %}
                                {{ login_form.errors.passwrod.0 }}
                                {% else %}
                                {{ err }}
                            {% endif %}
                        </div>
                        <div class="errs">{{ err }}</div>
                        <div class="more_input clearfix">
                            <input type="checkbox" name="checkbox" value="1" checked="checked">
                            <label>记住用户名</label>
                            <a href="/account/modify/">忘记密码</a>
                        </div>
                        <input type="submit" name="" value="登录" class="input_submit">
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock content %}
